Optimal. Leaf size=131 \[ -\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {c-d} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {a} (c-d)^{3/2} f}+\frac {2 d \cos (e+f x)}{\left (c^2-d^2\right ) f \sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2858, 12, 2861,
214} \begin {gather*} \frac {2 d \cos (e+f x)}{f \left (c^2-d^2\right ) \sqrt {a \sin (e+f x)+a} \sqrt {c+d \sin (e+f x)}}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {c-d} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {a} f (c-d)^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 214
Rule 2858
Rule 2861
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {a+a \sin (e+f x)} (c+d \sin (e+f x))^{3/2}} \, dx &=\frac {2 d \cos (e+f x)}{\left (c^2-d^2\right ) f \sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}+\frac {\int \frac {a (c+d)}{\sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}} \, dx}{a \left (c^2-d^2\right )}\\ &=\frac {2 d \cos (e+f x)}{\left (c^2-d^2\right ) f \sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}+\frac {\int \frac {1}{\sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}} \, dx}{c-d}\\ &=\frac {2 d \cos (e+f x)}{\left (c^2-d^2\right ) f \sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}-\frac {(2 a) \text {Subst}\left (\int \frac {1}{2 a^2-(a c-a d) x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\right )}{(c-d) f}\\ &=-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {c-d} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\right )}{\sqrt {a} (c-d)^{3/2} f}+\frac {2 d \cos (e+f x)}{\left (c^2-d^2\right ) f \sqrt {a+a \sin (e+f x)} \sqrt {c+d \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(306\) vs. \(2(131)=262\).
time = 6.68, size = 306, normalized size = 2.34 \begin {gather*} \frac {\frac {2 d \cos (e+f x)}{c+d}+\frac {\log \left (1+\tan \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (c-d+2 \sqrt {c-d} \sqrt {\frac {1}{1+\cos (e+f x)}} \sqrt {c+d \sin (e+f x)}+(-c+d) \tan \left (\frac {1}{2} (e+f x)\right )\right )}{\frac {\sec ^2\left (\frac {1}{2} (e+f x)\right )}{2+2 \tan \left (\frac {1}{2} (e+f x)\right )}-\frac {-\frac {1}{2} (c-d) \sec ^2\left (\frac {1}{2} (e+f x)\right )+\frac {\sqrt {c-d} \left (\frac {1}{1+\cos (e+f x)}\right )^{3/2} (d+d \cos (e+f x)+c \sin (e+f x))}{\sqrt {c+d \sin (e+f x)}}}{c-d+2 \sqrt {c-d} \sqrt {\frac {1}{1+\cos (e+f x)}} \sqrt {c+d \sin (e+f x)}+(-c+d) \tan \left (\frac {1}{2} (e+f x)\right )}}}{(c-d) f \sqrt {a (1+\sin (e+f x))} \sqrt {c+d \sin (e+f x)}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(873\) vs.
\(2(112)=224\).
time = 9.53, size = 874, normalized size = 6.67
method | result | size |
default | \(-\frac {\ln \left (\frac {2 \sqrt {2 c -2 d}\, \sqrt {2}\, \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right )+2 \cos \left (f x +e \right ) c -2 d \cos \left (f x +e \right )+2 c \sin \left (f x +e \right )-2 d \sin \left (f x +e \right )-2 c +2 d}{1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}\right ) \sqrt {2}\, \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, c \sin \left (f x +e \right )+\ln \left (\frac {2 \sqrt {2 c -2 d}\, \sqrt {2}\, \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right )+2 \cos \left (f x +e \right ) c -2 d \cos \left (f x +e \right )+2 c \sin \left (f x +e \right )-2 d \sin \left (f x +e \right )-2 c +2 d}{1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}\right ) \sqrt {2}\, \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, d \sin \left (f x +e \right )+\cos \left (f x +e \right ) \sqrt {2}\, \ln \left (\frac {2 \sqrt {2 c -2 d}\, \sqrt {2}\, \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right )+2 \cos \left (f x +e \right ) c -2 d \cos \left (f x +e \right )+2 c \sin \left (f x +e \right )-2 d \sin \left (f x +e \right )-2 c +2 d}{1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, c +\cos \left (f x +e \right ) \sqrt {2}\, \ln \left (\frac {2 \sqrt {2 c -2 d}\, \sqrt {2}\, \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right )+2 \cos \left (f x +e \right ) c -2 d \cos \left (f x +e \right )+2 c \sin \left (f x +e \right )-2 d \sin \left (f x +e \right )-2 c +2 d}{1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, d +\sqrt {2}\, \ln \left (\frac {2 \sqrt {2 c -2 d}\, \sqrt {2}\, \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right )+2 \cos \left (f x +e \right ) c -2 d \cos \left (f x +e \right )+2 c \sin \left (f x +e \right )-2 d \sin \left (f x +e \right )-2 c +2 d}{1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, c +\sqrt {2}\, \ln \left (\frac {2 \sqrt {2 c -2 d}\, \sqrt {2}\, \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, \sin \left (f x +e \right )+2 \cos \left (f x +e \right ) c -2 d \cos \left (f x +e \right )+2 c \sin \left (f x +e \right )-2 d \sin \left (f x +e \right )-2 c +2 d}{1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}\right ) \sqrt {\frac {c +d \sin \left (f x +e \right )}{\cos \left (f x +e \right )+1}}\, d -2 d \sqrt {2 c -2 d}\, \cos \left (f x +e \right )}{f \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {c +d \sin \left (f x +e \right )}\, \left (c +d \right ) \sqrt {2 c -2 d}\, \left (c -d \right )}\) | \(874\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 396 vs.
\(2 (118) = 236\).
time = 0.59, size = 1064, normalized size = 8.12 \begin {gather*} \left [-\frac {8 \, {\left (d \cos \left (f x + e\right ) - d \sin \left (f x + e\right ) + d\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {d \sin \left (f x + e\right ) + c} - \frac {\sqrt {2} {\left (a c^{2} + 2 \, a c d + a d^{2} - {\left (a c d + a d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (a c^{2} + a c d\right )} \cos \left (f x + e\right ) + {\left (a c^{2} + 2 \, a c d + a d^{2} + {\left (a c d + a d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \log \left (\frac {{\left (c^{2} - 14 \, c d + 17 \, d^{2}\right )} \cos \left (f x + e\right )^{3} - {\left (13 \, c^{2} - 22 \, c d - 3 \, d^{2}\right )} \cos \left (f x + e\right )^{2} + \frac {4 \, \sqrt {2} {\left ({\left (c^{2} - 4 \, c d + 3 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - 4 \, c^{2} + 8 \, c d - 4 \, d^{2} - {\left (3 \, c^{2} - 4 \, c d + d^{2}\right )} \cos \left (f x + e\right ) + {\left (4 \, c^{2} - 8 \, c d + 4 \, d^{2} + {\left (c^{2} - 4 \, c d + 3 \, d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {d \sin \left (f x + e\right ) + c}}{\sqrt {a c - a d}} - 4 \, c^{2} - 8 \, c d - 4 \, d^{2} - 2 \, {\left (9 \, c^{2} - 14 \, c d + 9 \, d^{2}\right )} \cos \left (f x + e\right ) + {\left ({\left (c^{2} - 14 \, c d + 17 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - 4 \, c^{2} - 8 \, c d - 4 \, d^{2} + 2 \, {\left (7 \, c^{2} - 18 \, c d + 7 \, d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{\cos \left (f x + e\right )^{3} + 3 \, \cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right )^{2} - 2 \, \cos \left (f x + e\right ) - 4\right )} \sin \left (f x + e\right ) - 2 \, \cos \left (f x + e\right ) - 4}\right )}{\sqrt {a c - a d}}}{4 \, {\left ({\left (a c^{2} d - a d^{3}\right )} f \cos \left (f x + e\right )^{2} - {\left (a c^{3} - a c d^{2}\right )} f \cos \left (f x + e\right ) - {\left (a c^{3} + a c^{2} d - a c d^{2} - a d^{3}\right )} f - {\left ({\left (a c^{2} d - a d^{3}\right )} f \cos \left (f x + e\right ) + {\left (a c^{3} + a c^{2} d - a c d^{2} - a d^{3}\right )} f\right )} \sin \left (f x + e\right )\right )}}, -\frac {\sqrt {2} {\left (a c^{2} + 2 \, a c d + a d^{2} - {\left (a c d + a d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (a c^{2} + a c d\right )} \cos \left (f x + e\right ) + {\left (a c^{2} + 2 \, a c d + a d^{2} + {\left (a c d + a d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {-\frac {1}{a c - a d}} \arctan \left (-\frac {\sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} {\left ({\left (c - 3 \, d\right )} \sin \left (f x + e\right ) - 3 \, c + d\right )} \sqrt {d \sin \left (f x + e\right ) + c} \sqrt {-\frac {1}{a c - a d}}}{4 \, {\left (d \cos \left (f x + e\right ) \sin \left (f x + e\right ) + c \cos \left (f x + e\right )\right )}}\right ) + 4 \, {\left (d \cos \left (f x + e\right ) - d \sin \left (f x + e\right ) + d\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {d \sin \left (f x + e\right ) + c}}{2 \, {\left ({\left (a c^{2} d - a d^{3}\right )} f \cos \left (f x + e\right )^{2} - {\left (a c^{3} - a c d^{2}\right )} f \cos \left (f x + e\right ) - {\left (a c^{3} + a c^{2} d - a c d^{2} - a d^{3}\right )} f - {\left ({\left (a c^{2} d - a d^{3}\right )} f \cos \left (f x + e\right ) + {\left (a c^{3} + a c^{2} d - a c d^{2} - a d^{3}\right )} f\right )} \sin \left (f x + e\right )\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \left (c + d \sin {\left (e + f x \right )}\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{\sqrt {a+a\,\sin \left (e+f\,x\right )}\,{\left (c+d\,\sin \left (e+f\,x\right )\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________